(function () {
	'use strict';

	angular
		.module('app')
		.factory('APIShippingService', APIShippingService);

	APIShippingService.$inject = ['$http', '$q', '$timeout', '$rootScope', 'CacheFactory', 'ENUM'];

	function APIShippingService($http, $q, $timeout, $rootScope, CacheFactory, ENUM) {

		var service = new APIEndpoint($http, $q, $timeout, CacheFactory, 'APIShippingService');
		service.getAllExpress = function( params ) {
            return this.fetch( '/weixin/order/getAllExpress', params, false, function(res){
                return ENUM.ERROR_CODE.OK == res.data.code ? res.data.data : null;
            });
        };

		service.getFirstExpress = function( params ) {
            return this.fetch( '/weixin/order/getFirstExpress', params, false, function(res){
                return ENUM.ERROR_CODE.OK == res.data.code ? res.data.data : null;
            });
        };

		service.statusGet = function( params ) {
            return this.fetch( 'ecapi.coupon.list', params, false, function(res){
                return ENUM.ERROR_CODE.OK == res.data.code ? res.data.data : null;
            });
        };

		return service;


	}

})();